#include <cstdint>
#include <iostream>
#include <random>

using ll = int64_t;
using std::cout;

const ll inf = 20;

int main(){
    std::random_device rd;
    std::mt19937_64 mt{rd()};
    std::uniform_int_distribution<ll> uidn{5, inf};
    auto t  = uidn(mt);
    cout<<t<<'\n';
    while(t--){
        ll n{uidn(mt)};
        cout<<n<<'\n';
        std::uniform_int_distribution<ll> uida{1,inf};
        while(n--){
            cout<<uida(mt)<<' ';
        }
        cout<<'\n';
    }
    
}